package com.zheng.study.web.quartz;

import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * 定时任务注解方式
 * ============================================================================
 * author : dzw
 * createDate:  2018/8/21 。
 * ============================================================================
 */
@Service
@EnableScheduling
public class MyJob {

//	@Scheduled(cron = "0/1 * * * * ?")
//	@Transactional(propagation= Propagation.REQUIRED, isolation= Isolation.DEFAULT)
//	public void test11(){
//		System.out.println("hello");
//	}
//
//	@Scheduled(cron = "0/3 * * * * ?")
//	@Transactional(propagation= Propagation.REQUIRED, isolation= Isolation.DEFAULT)
//	public void test2(){
//		System.out.println("word!!!");
//	}

}
